home *** CD-ROM | disk | FTP | other *** search
/ Sunday Savers: Singing Fun! / Sunday Savers: Singing Fun!.iso / mac / Xtras / Buddy API 3.7 / Buddy API Docs.swf / texts / 1100.txt < prev    next >
Encoding:
Text File  |  2004-08-31  |  4.0 KB  |  135 lines

  1. 15
  2. --- RECORDSEPARATOR ---
  3.  
  4. --- RECORDSEPARATOR ---
  5. FindApp 
  6. --- RECORDSEPARATOR ---
  7. Platform:
  8. --- RECORDSEPARATOR ---
  9.  
  10. --- RECORDSEPARATOR ---
  11. Windows and Macintosh
  12. --- RECORDSEPARATOR ---
  13.  
  14. --- RECORDSEPARATOR ---
  15. Description:
  16. --- RECORDSEPARATOR ---
  17.  
  18. --- RECORDSEPARATOR ---
  19. baFindApp finds an application.
  20. --- RECORDSEPARATOR ---
  21.  
  22. --- RECORDSEPARATOR ---
  23. Usage:
  24. --- RECORDSEPARATOR ---
  25.  
  26. --- RECORDSEPARATOR ---
  27. Result = baFindApp( Type )
  28. --- RECORDSEPARATOR ---
  29.  
  30. --- RECORDSEPARATOR ---
  31. Arguments:
  32. --- RECORDSEPARATOR ---
  33.  
  34. --- RECORDSEPARATOR ---
  35. String. 
  36. --- RECORDSEPARATOR ---
  37. Type is the extension of the file type on Windows or the Creator type on Macintosh.
  38. --- RECORDSEPARATOR ---
  39.  
  40. --- RECORDSEPARATOR ---
  41. Returns:
  42. --- RECORDSEPARATOR ---
  43.  
  44. --- RECORDSEPARATOR ---
  45. String.
  46. --- RECORDSEPARATOR ---
  47.  
  48. --- RECORDSEPARATOR ---
  49. Windows
  50. --- RECORDSEPARATOR ---
  51.  - returns the full path name to the application. Returns an empty string if 
  52. --- RECORDSEPARATOR ---
  53. the extension is not associated with or a program, or the associated program does 
  54. --- RECORDSEPARATOR ---
  55. not exist.
  56. --- RECORDSEPARATOR ---
  57.  
  58. --- RECORDSEPARATOR ---
  59. Macintosh
  60. --- RECORDSEPARATOR ---
  61.  - returns the full path name to the application. Returns an empty string if 
  62. --- RECORDSEPARATOR ---
  63. the application is not installed.
  64. --- RECORDSEPARATOR ---
  65.  
  66. --- RECORDSEPARATOR ---
  67. Examples:
  68. --- RECORDSEPARATOR ---
  69.  
  70. --- RECORDSEPARATOR ---
  71. Director: 
  72. --- RECORDSEPARATOR ---
  73. set Notepad = baFindApp( "txt" ) 
  74. --- RECORDSEPARATOR ---
  75. set SimpleText = baFindApp( "ttxt" ) 
  76. --- RECORDSEPARATOR ---
  77. Authorware: 
  78. --- RECORDSEPARATOR ---
  79. Acrobat := baFindApp( "pdf" ) 
  80. --- RECORDSEPARATOR ---
  81. Acrobat := baFindApp( "CARO" )
  82. --- RECORDSEPARATOR ---
  83.  
  84. --- RECORDSEPARATOR ---
  85. Notes:
  86. --- RECORDSEPARATOR ---
  87.  
  88. --- RECORDSEPARATOR ---
  89. In 32bit Windows, Microsoft guidelines state that if a program registers a file 
  90. --- RECORDSEPARATOR ---
  91. extension, and the path to the executable file is a long file name, then that name 
  92. --- RECORDSEPARATOR ---
  93. must be included in quotes. If an installation program doesn't follow these 
  94. --- RECORDSEPARATOR ---
  95. guidelines, then this function may fail. Specifically, if the path name to the 
  96. --- RECORDSEPARATOR ---
  97. executable contains a space, then this function will not be able to return the path to 
  98. --- RECORDSEPARATOR ---
  99. the executable. Adobe Acrobat Reader 3 is one program that does not register 
  100. --- RECORDSEPARATOR ---
  101. itself correctly - it does not place quotes around the executable name in the 
  102. --- RECORDSEPARATOR ---
  103. registry. The baFindApp function has been written around this particular problem 
  104. --- RECORDSEPARATOR ---
  105. with Acrobat, and will use other methods to locate Acrobat if it is asked to find the 
  106. --- RECORDSEPARATOR ---
  107. app associated with "pdf" files. 
  108. --- RECORDSEPARATOR ---
  109. Each application on the Mac has itΓÇÖs own unique four character identifier eg, 
  110. --- RECORDSEPARATOR ---
  111. ΓÇ£CAROΓÇ¥ for Acrobat, ΓÇ£MOSSΓÇ¥ for Netscape, ΓÇ£MSIEΓÇ¥ for Internet Explorer. There are 
  112. --- RECORDSEPARATOR ---
  113. a number of shareware utilities available which will tell you the creator type of a 
  114. --- RECORDSEPARATOR ---
  115. application, such as File Buddy by Laurence Harris. You can also use AppleΓÇÖs 
  116. --- RECORDSEPARATOR ---
  117. ResEdit. 
  118. --- RECORDSEPARATOR ---
  119. Under OSX, you can also use extensions to find an application. For example, 
  120. --- RECORDSEPARATOR ---
  121. baFindApp( ".txt" ) will return the application that will open .txt files that don't have a 
  122. --- RECORDSEPARATOR ---
  123. file type/creator. You must use a . at the beginning of the extension. 
  124. --- RECORDSEPARATOR ---
  125. Under OSX, if the application to be found is inside a bundle, then the name that is 
  126. --- RECORDSEPARATOR ---
  127. returned is the name to the bundle. You can tell if a bundle has been returned 
  128. --- RECORDSEPARATOR ---
  129. because it will end in a : 
  130. --- RECORDSEPARATOR ---
  131. For example, baFindApp( ".txt" ) may return 
  132. --- RECORDSEPARATOR ---
  133. "OSX:Applications:TextEdit.app:" 
  134. --- RECORDSEPARATOR ---
  135. You can pass this name into other functions, eg baOpenFile.